/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张宇田
 * Date: 2024-09-27
 * Time: 21:38
 */
public class Animal {
     String name ;
    private int age ;

    public void eat (){
        System.out.println(name + ":正在吃饭......" );
    }
    public Animal(String name,int age){
        this.name = name;
        this.age = age;
    }
}
class Dog extends Animal{
    String name;
    public Dog(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(super.name +":正在吃狗粮");
    }
}

class Test{
    public static void main(String[] args) {

    }
}